/*
 * @Author: xiaosihan 
 * @Date: 2022-09-07 04:07:08 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-01-20 04:56:53
 */
import { Color } from 'three';
import threeLoader from 'three-base/threeLoader';
import { LensflareElement, Lensflare as THREELensflare } from 'three/examples/jsm/objects/Lensflare';
import lensflare0PNG from "./lensflare0.png";
import lensflare3PNG from "./lensflare3.png";

// 镜头光
export default class Lensflare extends THREELensflare {

    constructor() {
        super();

        this.addElement(new LensflareElement(threeLoader.getTexture(lensflare0PNG), 200, 0, new Color("#ffffff")));
        this.addElement(new LensflareElement(threeLoader.getTexture(lensflare0PNG), 60, 0.6));
        this.addElement(new LensflareElement(threeLoader.getTexture(lensflare3PNG), 70, 0.7));
        this.addElement(new LensflareElement(threeLoader.getTexture(lensflare3PNG), 120, 0.9));
        this.addElement(new LensflareElement(threeLoader.getTexture(lensflare3PNG), 70, 1));
    }

}
